<?php
require_once 'admin/config/config.php';
$conn = new mysqli(HOST, USER, PASSWORD, DATABASE);
if ($conn->connect_errno) {
    die('数据库连接失败：' . $conn->connect_error);
}
?>
<!DOCTYPE html>
<html>
    <head>
        <title>艺海无际列表页</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="css/liebiao.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <div class="usual">
            <div class="top_navigation">
                <div>
                    <a href="shouye.php" class="normal select1">首页</a>
                    <a href="javascript:;" class="normal">视频</a>
                    <a href="javascript:;" class="normal">音乐</a>
                    <a href="javascript:;" class="normal">照片</a>
                    <a href="javascript:;" class="normal">资讯</a>
                    <a href="neirong.php" class="normal">关于我们</a>
                    <a href="neirong.php" class="normal">联系我们</a>
                </div>
            </div>
            <div class="banner">
                <ul>
                    <?php
                    $stmt = $conn->prepare('select * from banner_list');
                    $stmt->execute();
                    $stmt->bind_result($id, $src, $time, $url);
                    while ($stmt->fetch()) {
                        ?>
                        <li><a href="<?php echo $url; ?>"><img src="<?php echo $src; ?>" alt=""/></a></li>
                        <?php
                    }
                    ?>
                </ul>
                <ol>
                    <li class=" select2"></li>
                </ol>
            </div>
            <div class="breadcrumb_trail">
                <p>当前位置：首页&GT;视频</p>
            </div>
            <div class="body">
                <div>
                    <span class="b c" id="0">视频&GT;&GT;</span>
                    <span class="b" id="1">音乐&GT;&GT;</span>
                    <span class="b" id="2">照片&GT;&GT;</span>
                    <span class="b" id="3">资讯&GT;&GT;</span>
                </div>
                <div >
                    <ul class="video">
                        <?php 
                          $stmt = $conn->prepare('select * from media_list where type=0');
                    $stmt->execute();
                    $stmt->bind_result($id, $type, $content, $title, $time, $src);
                    while ($stmt->fetch()) {
                        ?>
                        <li>
                            <img src="<?php echo $src;?>" alt=""/><h1><?php echo $title;?></h1>
                        </li> 
                    <?php }?>
                    </ul>
                     <ul class="music">
                        <?php 
                          $stmt = $conn->prepare('select * from media_list where type=1');
                    $stmt->execute();
                    $stmt->bind_result($id, $type, $content, $title, $time, $src);
                    while ($stmt->fetch()) {
                        ?>
                        <li>
                            <img src="<?php echo $src;?>" alt=""/><h1><?php echo $title;?></h1>
                        </li> 
                    <?php }?>  
                    </ul>
                     <ul class="photo">
                        <?php 
                          $stmt = $conn->prepare('select * from media_list where type=2');
                    $stmt->execute();
                    $stmt->bind_result($id, $type, $content, $title, $time, $src);
                    while ($stmt->fetch()) {
                        ?>
                        <li>
                            <img src="<?php echo $src;?>" alt=""/><h1><?php echo $title;?></h1>
                        </li> 
                    <?php }?>
                    </ul>
                     <ul class="news">
                        <?php 
                          $stmt = $conn->prepare('select * from media_list where type=3');
                    $stmt->execute();
                    $stmt->bind_result($id, $type, $content, $title, $time, $src);
                    while ($stmt->fetch()) {
                        ?>
                        <li>
                            <img src="<?php echo $src;?>" alt=""/><h1><?php echo $title;?></h1><?php echo $content;?>
                        </li> 
                    <?php }?> 
                    </ul>
                </div>
            </div>
            <div class="foot">
                <img src="img/neirong/foot.jpg" alt=""/>
            </div>
        </div>
        <script src="js/jquery.min.js" type="text/javascript"></script>
        <script src="js/liebiao.js" type="text/javascript"></script>
    </body>
</html>

